import store from '@/store';
export function getToken(name) {
  return localStorage.getItem(name);
}

export function setToken(name, value) {
  return localStorage.setItem(name, value);
}

export function removeToken(name) {
  return localStorage.removeItem(name);
}

export function getTokenRoleList() {
  const roleList = getToken('roleIdList');
  if (roleList) {
    store.commit('user/setRoleInfos', JSON.parse(roleList));
    //! 之后改
    store.commit('user/setRoleInfos', 0);
  }
}

